import {createAsyncThunk,createSlice} from '@reduxjs/toolkit'
import * as services from 'services/Consultationinformation/PatientInformationPage'
import { addBuilder } from 'store/dict'
export const doPatientInformationPage = createAsyncThunk<any,any>(
    'doPatientIn/doPatientInformationPage',
    async(userId)=>{
        console.log(userId);
        const res = await services.PatientInformationPage(userId)
        return res
    }
)
const initialState = {
    
}
const doPatientIn = createSlice ({
    name:'doPatientIn',
    initialState,
    reducers:{},
    extraReducers:(builder)=>{
        addBuilder(builder,doPatientInformationPage,(state,action)=>{
            const {result} = action.payload
            state.doPatientIn = result
            // console.log("ooosososo",state.doPatientIn);
        })
    }
})
export default doPatientIn.reducer


export const PatientInformationPageslice = (state: any) => {
// console.log('1111',state.doPatientIn.doPatientIn);

    return state.doPatientIn.doPatientIn;

};
